package com.ruoyi.generator.util;

import com.ruoyi.system.domain.User;
import org.springframework.security.core.context.SecurityContextHolder;

public class UserUtils {

    public static User getLoginUser(){

        return (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }


}
